﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Xml;

namespace CommonUtils
{
	public class XmlUtils
	{
		/// <summary>
		/// 
		/// </summary>
		/// <param name="node"></param>
		/// <param name="attribute"></param>
		/// <returns></returns>
		public static string GetAttribute(XmlNode node, string attribute)
		{
			Assert.ArgumentNotNull(node, "node");
			Assert.ArgumentNotNull(attribute, "attribute");

			XmlAttribute attr = node.Attributes[attribute];
			if (attr != null)
				return attr.Value;

			return null;
		}
	}
}
